//wanghaifeng

function copyOptions(sourceSelect,targetSelect,onlySelected){
	var sourceOptions = sourceSelect.options;
	var length = targetSelect.options.length;
	alert(length);
	for(i=sourceOptions.length-1; i>=0; i--){
		var sourceOption = sourceOptions[i];
		if(onlySelected==true && !sourceOption.selected) continue;
		var oOption = document.createElement("option");
		oOption.innerText = sourceOption.innerText;
		oOption.value=sourceOption.value;
		alert(oOption.tag+":"+document);
		//targetSelect.options.add(oOption, length);
		//sourceSelect.options.remove(i);
	}
}
